If we test multiple domain create/shutdown many times.
sometimes abnormal values of cpu(%) are appeared.
This is because shutdown domain remove failure.
(in other words, memory corruption of struct )
This corruption makes abnormal cpu(%) values are shown xentop
sometimes.
Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
/* shift entries following specified entry up by one */
if (entry < node->num_domains) {
xenstat_domain *domain = &node->domains[entry];
- memmove(domain,domain+1,node->num_domains-entry);
+ memmove(domain,domain+1,(node->num_domains - entry) * sizeof(xenstat_domain) );
}
/* zero out original last entry from node -- not